package org.example.mapper;

import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.example.pojo.Student;
import org.example.pojo.StudentQueryParam;

import java.util.List;
import java.util.Map;

@Mapper
public interface StudentMapper{
    List<Student> list(StudentQueryParam studentQueryParam);

    void insert(Student student);

    Student getById(Integer id);

    void update(Student student);

    void deleteByIds(List<Integer> ids);

    void violation(Integer id, Short score);

    @MapKey("pos")
    List<Map<String, Object>> getStudentCountData();
    @MapKey("name")
    List<Map<String, Object>> getStudentDegreeData();
}
